/**
 * @file launcher.h
 *
 */
#ifndef LAUNCHER_H
#define LAUNCHER_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lvgl.h"
#include "lv_watch_conf.h"
#else
#include "../../../lvgl/lvgl.h"
#include "../../../lv_watch_conf.h"
#endif

#if USE_LV_WATCH_LAUNCHER != 0

/*********************
 *      DEFINES
 *********************/
#define LAUNCHER_TILEVIEW_LED_ON_WIDTH 8
#define LAUNCHER_TILEVIEW_LED_OFF_WIDTH 6
#define LAUNCHER_HOR_SLIDING_LOOP_MODE_ENABLE 1
#define LAUNCHER_LED_ENABLE 1
/**********************
 *      TYPEDEFS
 **********************/
typedef struct
{
    lv_watch_activity_ext_t activity_obj;
    /*New data for this type */
    uint8_t show_leds_en; /*one bit for one tab*/
    lv_obj_t * leds_content;
    lv_obj_t ** leds;
} lv_launcher_obj_ext_t;

typedef struct
{
    lv_tileview_ext_t old_ext;
    /*New data for this type */
    lv_obj_t * leds_content;
    lv_obj_t * leds[3];
    lv_obj_t * pedometer_dot;
    lv_obj_t * pedometer_cont;
    lv_obj_t * pedometer_goal;
    uint8_t pull_up_start;
} lv_drop_pull_obj_ext_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/
lv_obj_t * launcher_activity_create(void);
void sport_create_event_cb(lv_obj_t * btn, lv_event_t e);
lv_obj_t * launcher_tileview_add_tile(lv_obj_t * tileview, uint16_t id);
lv_drop_pull_obj_ext_t * launcher_dp_get_ext(void);
bool launcher_tileview_act_is_dial(void);
lv_drop_pull_obj_ext_t * launcher_get_dp_ext(void);
void launcher_recreate(void);
void launcher_power_key_event(void);
/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_WATCH_LAUNCHER*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*LAUNCHER_H*/
